﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using NHibernate;
using FluentNHibernate.Cfg;
using FluentNHibernate.Cfg.Db;

namespace SmartProject.Data
{
    public class MsSQL : DataProvider
    {
        protected override ISessionFactory CreateSessionFactory()
        {
            return Fluently.Configure()
                .Database(MsSqlConfiguration.MsSql2008.ConnectionString(base.ConnectionString))
                .Mappings(m => m.FluentMappings.AddFromAssemblyOf<DataProvider>())
                .ExposeConfiguration(BuildSchema)
                .BuildSessionFactory();
        }
    }
}
